package com.water.quality.testing.controller;
import com.water.quality.testing.common.R;
import com.water.quality.testing.dao.ObservationPoint;
import com.water.quality.testing.service.ObservationPointService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;

/**
 * 观测点请求处理
 */
@RestController
@RequiredArgsConstructor
public class ObservationPointController {
    private final ObservationPointService observationPointService;

    /**
     * 获取所有的观测点
     */
    @GetMapping("/api/water/quality/points")
    public R<List<ObservationPoint>> getAllPoints() {
        return R.success(observationPointService.getAllObservationPoints());
    }

}
